package jdk8的特性.练习案例;

import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @author idea
 * @data 2018/9/10
 */
public class StreamTest2 {

    private static void print(String item){
        System.out.println(item);
    }

    public static void main(String[] args) {
        Stream.of("one","two","three","hahah","thica")
                .filter(e->e.length()>3)
                .peek(e-> print(e))

                .map(String::toUpperCase)
                .peek(e-> print(e))

                .map(String::toLowerCase)
                .peek(e-> print(e))


                .collect(Collectors.toList());

    }

}
